package com.tanhua.server.interceptor;

import com.tan.model.domain.User;

public class Userthread {
    static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();
    public static void setUser(User user){
        userThreadLocal.set(user);
    }
    public static User getUser(){
        return userThreadLocal.get();
    }

    public static void removeUser() {
        userThreadLocal.remove();
    }
}
